package com.mycompany.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mycompany.dao.CommonDao;
import com.mycompany.dao.TeacherDao;
import com.mycompany.entity.Teacher;

@Service
public class TeacherServiceImpl extends DefaultCommonService<Long, Teacher>
		implements TeacherService {
	@Autowired
	private TeacherDao teacherDao;

	@Override
	public List<Teacher> getTeacherByName(String tname) {
		return teacherDao.getTeacherByName(tname);
	}

	@Override
	public List<Teacher> getTeacherBySchoolId(Long sid) {
		return teacherDao.getTeacherBySchoolId(sid);
	}

	@Override
	protected CommonDao<Long, Teacher> getDao() {
		return teacherDao;
	}
}
